package com.helper.dream.a361phonehelper.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;

import com.helper.dream.a361phonehelper.R;
import com.helper.dream.a361phonehelper.utils.ApiManager;

/**
 * Created by LamYu on 16/12/19/0019.
 */

public class TuiJianFuliFragment extends Fragment {
    WebView wv;
    View view;
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        view=inflater.inflate(R.layout.fragment_tuijian_fuli,container,false);
        setupViews();
        return view;
    }

    @Override
    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
    }

    private void setupViews() {
        wv= (WebView) view.findViewById(R.id.wv_tj_fl);
        wv.getSettings().setJavaScriptEnabled(true);
        wv.setWebViewClient(new WebViewClient(){

            @Override
            public boolean shouldOverrideUrlLoading(WebView view, String url) {
                view.loadUrl(url);
                return true;
            }
        });
        wv.setWebChromeClient(new WebChromeClient());
        wv.loadUrl(ApiManager.TjFl);
    }
}
